<template functional>
  <a-sub-menu :key="props.menuInfo.router">
    <template v-if="props.menuInfo.meta">
      <span slot="title">
        <icon-font :type="props.menuInfo.meta.icon" />
        <span>{{ props.menuInfo.meta.title }}</span>
      </span>
    </template>
    <template v-for="item in props.menuInfo.children">
      <a-menu-item v-if="!item.children || item.children.length==0" :key="item.router">
        <template v-if="item.meta">
          <router-link :to="{path:item.router}">
            <icon-font :type=" item.meta.icon" />
            <span>{{ item.meta.title }}</span>
          </router-link>
        </template>
      </a-menu-item>
      <sub-menu v-else :key="item.router" :menu-info="item" />
    </template>
  </a-sub-menu>
</template>
export default {
  props: ['menuInfo']
};